﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='category_update' and s.name='Crm')
DROP PROCEDURE [Crm].category_update
GO
CREATE PROCEDURE [Crm].category_update 
@PK uniqueidentifier, 
@Name nvarchar(200), 
@Description nvarchar(250), 
@Color varchar(10)
AS
BEGIN
UPDATE [Crm].[Categories] 
SET	[name] = @Name ,
	[description] = @Description ,
	[color] = @Color 
WHERE
	[id_category] = @PK 
END